
package com.yinbo.database;

import java.sql.Connection;
import java.sql.SQLException;

/**
 * 
 *  @author Y.N
 *
 */
public interface ConnectionProvider {

    public boolean isPooled();

    /**
     * 获取数据库连接
     * @return a Connection object.
     * @throws SQLException is an SQL error occured while retrieving the connection.
     */
    public Connection getConnection() throws SQLException;

    /**
     * 启动连接提供程序
     */
    public void start();

    /**
     * 重启启动连接提供程序
     */
    public void restart();

    /**
     * 销毁提供程序
     */
    public void destroy();
}